package com.heima.article.job;

import com.heima.article.service.ApArticleService;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

/**
 * @Author Lijx
 * @Date 2024-08-06 14:17
 */
@Component
@Slf4j
public class HotArticleComputeJob {

    @Autowired
    private ApArticleService articleService;


    /**
     * 热点文章计算
     */
    @XxlJob("computeHotArticleJob")
    public void hotArticleCompute(){
        log.info("热点文章计算begin.........");

        articleService.computeHotArticle();

        log.info("热点文章计算end.........");
    }
}
